from Tkinter import *
import pygame.mixer

def wait_finish(channel):
    while channel.get_busy():
        pass

sounds=pygame.mixer
sounds.init()
correct_s=sounds.Sound("correct.wav")
wrong_s=sounds.Sound("wrong.wav")

def button_click_1():
    number_correct.set(number_correct.get()+1)
    wait_finish(correct_s.play())
def button_click_2():
    number_correct.set(number_wrong.get()+1)
    wait_finish(wrong_s.play())

app=Tk()
app.title("Yet another windows here!")
app.geometry('400x300+300+300')

number_correct=IntVar()
number_correct.set(0)
number_wrong=IntVar()
number_wrong.set(0)

l =  Label(app, text="When you are ready,click on the buttons!",height=3)
l.pack()

lab1=Label(app,textvariable=number_correct)
lab1.pack(side="left")
lab2=Label(app,textvariable=number_wrong)
lab2.pack(side="right")
b1=Button(app, text="Correct!", width=10, command=button_click_1)
b1.pack(side='left',padx=10,pady=10)

b2=Button(app, text="Wrong!", width=10, command=button_click_2)
b2.pack(side='right',padx=10,pady=10)

app.mainloop()
